package com.wanshi.cloud.client;


import com.wanshi.cloud.entity.Orders;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 顽石教育-www.wanshi.com
 * @since 2021-05-12
 */
@FeignClient(value="order-server")
@RequestMapping("/feign/order")
public interface OrderClient {

    //1 根据userId查询用户
    @GetMapping("/user/{userId}")
    List<Orders> findByUserId(@PathVariable Integer userId);


}
